package com.weiyin.examination.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.weiyin.examination.R;
import com.weiyin.examination.util.LayoutHelper;

/**
 * <pre>
 *     e-mail : niejunfeng@win-electr.com
 *     time   : 2018/04/04
 *     desc   :
 *     version: 1.0.0
 *     Copyright: Copyright（c）2017
 *     Company:上海蔚音电子科技有限公司
 * </pre>
 *
 * @author niejunfeng
 */
public class PayActivity extends BaseActivity implements View.OnClickListener {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pay);

        LayoutHelper layoutHelper = new LayoutHelper(this);
        layoutHelper.scaleView(findViewById(R.id.payLayout));

        initView();
    }

    private void initView() {
        Button payYes = (Button) findViewById(R.id.payYes);
        Button payNo = (Button) findViewById(R.id.payNo);

        TextView title = (TextView) findViewById(R.id.title);
        title.setText("支付");
        ImageView back = (ImageView) findViewById(R.id.back);
        back.setOnClickListener(this);
        payYes.setOnClickListener(this);
        payNo.setOnClickListener(this);

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.back:
                finish();
                break;
            case R.id.payYes:
                startActivity(new Intent(PayActivity.this, LoadingActivity.class));
                break;
            case R.id.payNo:
                finish();
                break;
            default:
                break;
        }
    }
}
